package com.weayer.remote;

import com.weayer.dto.Car;
import com.weayer.dto.ResponseResult;
import com.weayer.response.OrderDriverResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @description: Service服务 - 订单 - service-driver-user远程调用
 * @author: Weayer
 **/
@FeignClient("service-driver-user")
public interface ServiceDriverUserClient {
    @RequestMapping(method = RequestMethod.GET, value = "/city-driver/is-available-driver")
    public ResponseResult<Boolean> isAvailableDriver(@RequestParam String cityCode);

    @RequestMapping(method = RequestMethod.GET, value = "/get-available-driver/{carId}")
    public ResponseResult<OrderDriverResponse> getAvailableDriver(@PathVariable("carId") Long carId);

    @RequestMapping(method = RequestMethod.GET, value = "/car/{carId}")
    public ResponseResult<Car> getCarById(@PathVariable("carId") Long carId);
}
